<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<h3>学生列表</h3>
<a href="addStudent.jsp">添加学生</a>
<table border="1">
    <tr>
        <th>学生编号</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>性别</th>
        <th>电话</th>
        <th>邮箱</th>
        <th>创建时间</th>
        <th>爱好</th>
        <th>课程</th>
        <th colspan="2">操作</th>
    </tr>
    <c:forEach var="stu" items="${requestScope.studentList}">
        <tr>
            <td>${stu.id}</td>
            <td>${stu.name}</td>
            <td>${stu.age}</td>
            <td>${stu.sex==1?"男":"女"}</td>
            <td>${stu.phone}</td>
            <td>${stu.email}</td>
            <td>${stu.createTime}</td>
            <td>${stu.loves}</td>
            <td>${stu.course}</td>
            <td>
                <a href="http://localhost:8080/Student?action=del&id=${stu.id}">删除</a>
                <a href="http://localhost:8080/Student?action=byId&id=${stu.id}">修改</a>
            </td>
        </tr>
    </c:forEach>
</table>

</body>
</html>
